import Vue from 'vue'
import Router from 'vue-router'
import login from '../view/login'

import home from '../components/home'
import student from '../components/student'
import grade from '../components/grade'
import analyse from '../components/analyse'

Vue.use(Router)

export default new Router({
  routes: [
    {
      // 路由跳转路径
      path: '/',
      // 路由名称
      name: 'login',
      // 路由跳转组件
      component: login
    },
    {
       // 路由跳转路径
       path: '/home',
       //  路由名称
       name: 'home',
       // 路由跳转组件
       component: home,
       children:[{
          // 路由跳转路径
       path: '/student',
       //  路由名称
       name: 'student',
       // 路由跳转组件
       component: student,
       },
       {
         path: '/grade',
         name: 'grade',
         component: grade
       },
       {
        path: '/analyse',
        name: 'analyse',
        component: analyse
      }
       ]
     }
  ]
})
